package com.nightpiter.model.reader;

import com.nightpiter.controller.log.Logger;
import com.nightpiter.exceptions.ModelNotAssignedBuilderException;
import com.nightpiter.model.MetroModel;
import com.nightpiter.model.reader.xml.sax.SaxReader;

/**
 * Factory for MetroModelReader
 * 
 * @author Eldar Abusalimov (eldar.abusalimov@gmail.com)
 */
public class MetroModelReaderFactory {
	/**
	 * now this method simply returns SaxReader instance without any file
	 * pre-analyzing (may be implemented in future)
	 * 
	 * @return MetroModelReader implementation instance
	 * @throws ModelNotAssignedBuilderException
	 */
	public static MetroModelReader getReader(MetroModel model)
			throws ModelNotAssignedBuilderException {
		MetroModelReader reader = new SaxReader(model);
		Logger.writeNotice("MetroModelReader created. Returning new "
				+ reader.getClass().getSimpleName());
		return reader;
	}

}
